package sel.me.popular.library.learning.mapstruct;

/**
 * @author shenenlu 2021年02月20日 下午14:12:47
 */
public abstract class MapperStructTest {

    public static void main(String[] args) {
        PersonDO personDO = new PersonDO();
        personDO.setId(1);
        personDO.setName("zhangsan");
        personDO.setAge(PersonAgeEnum.FIFTEEN.getAge());
        Person person1 = PersonMapper.INSTANCE.convertDO2Model(personDO);

//        Person person2 = PersonMapper.INSTANCE.convertDO2ModelWithDate(personDO, new Date());
//        Person person2 = PersonMapper.INSTANCE.convertDO2ModelWithDate(personDO, null);
        Person person2 = PersonMapper.INSTANCE.convertDO2ModelWithNull(personDO);
        System.out.println(person2);
    }

}
